import httpUtil from './index.js'

// 新增apply
export function createApply (data) {
  return httpUtil({
    url: "/applys",
    method: "post",
    data
  })
}

// 查询apply
export function getApply (wgId, userId) {
  let url = "/applys?"
  if(wgId) {
    url += "&wgId=" + wgId
  }
  if(userId) {
    url += "&userId=" + userId
  }
  return httpUtil({
    url,
    method: "get"
  })
}

// 修改apply
export function updateApply (data) {
  return httpUtil({
    url: "/applys",
    method: "patch",
    data
  })
}